<?php

	function __autoload($class_name)
	{

		require_once "../../classes/" . $class_name . ".php";
	}
	


   if($_POST['MaDB']!=""){
    $bs = new khachhangbs();
	$bs->TimDiaBan = $_POST['MaDB'];
	
	$ts = new thamso();
	$ds = $bs->LayDanhSach();
	$makh = $ts->autonumber($ds,"MaKH",$_POST['MaDB'],8);
	echo "<input readonly='readonly' placeholder ='' tabindex='1' type='text' name='MaKH' class='txt' size='54' value = '".$makh."'/>";
   }
   ?>	